import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/Layout.vue'
import Reports from '../views/home/Reports.vue'
import Brand from '../views/item/Brand.vue'
// import Category from '../views/item/Category.vue'
import GoodsList from '../views/item/GoodsList.vue'
import Specification from '../views/item/Specification.vue'
import Statistics from '../views/user/Statistics.vue'
import UserList from '../views/user/UserList.vue'
import Statistics1 from '../views/sale/Statistics.vue'
import Order from '../views/sale/Order.vue'
import Logistics from '../views/sale/Logistics.vue'
import Promotion from '../views/sale/Promotion.vue'
import AuthList from '../views/authority/AuthList.vue'
import Role from '../views/authority/Role.vue'
import Member from '../views/authority/Member.vue'


Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: 'layout',
  component: Layout,
  redirect: '/index/report',
  children: [
    {
      name: 'reports',
      path: 'index/report',
      component: Reports
    },
    {
      name: 'brand',
      path: 'item/brand',
      component: Brand
    },
    {
      name: 'category',
      path: 'item/category',
      component: () => import('@/views/item/Category.vue')
    },
    {
      name: 'goodsList',
      path: 'item/goodsList',
      component: GoodsList
    },
    {
      name: 'specification',
      path: 'item/specification',
      component: Specification
    },
    {
      name: 'statistics',
      path: 'user/statistics',
      component: Statistics
    },
    {
      name: 'userList',
      path: 'user/userList',
      component: UserList
    },
    {
      name: 'statistics1',
      path: 'sale/statistics',
      component: Statistics1
    },
    {
      name: 'order',
      path: 'sale/order',
      component: Order
    },
    {
      name: 'logistics',
      path: 'sale/logistics',
      component: Logistics
    },
    {
      name: 'promotion',
      path: 'sale/promotion',
      component: Promotion
    },
    {
      name: 'authList',
      path: 'authority/authList',
      component: AuthList
    },
    {
      name: 'role',
      path: 'authority/role',
      component: Role
    },
    {
      name: 'member',
      path: 'authority/member',
      component: Member
    },
    
  ]
}]

const router = new VueRouter({
  routes
})

export default router